package com.hb.core.pojo.project.order.dto;

import com.hb.core.pojo.enums.PayStatusEnum;
import com.hb.core.pojo.project.order.entity.UserOrderGoods;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * describe:
 * 订单商品相关
 *
 * @author zhongdl
 * @date 2021/12/22
 */
@Getter
@Setter
public class UserOrderGoodsDTO extends UserOrderGoods {

    @ApiModelProperty(value = "订单信息")
    private UserOrderDTO userOrderDTO;

    /**
     * 项目ID
     */
    private Long projectId;

    /**
     * 企业名称
     */
    private String orgName;

    /**
     * 开票成功标识
     */
    private Integer invoiceSuccessFlag;

    /**
     * 增加订单状态的查询条件
     *
     * @param payStatus
     */
    public void addOrderStatus(PayStatusEnum payStatus) {
        if (userOrderDTO == null) {
            userOrderDTO = new UserOrderDTO();
        }
        userOrderDTO.setOrderStatus(payStatus.getCode());
    }
}
